package com.coincalf.wallet.web;

import com.coincalf.wallet.feign.dto.UserInfoDTO;
import com.coincalf.wallet.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 用户信息
 */
@RestController
@RequestMapping("/user")
public class UserInfoController {

    @Autowired
    private UserInfoService userInfoService;


    /**
     * 同步用户信息
     *
     * @param userInfo
     * @return
     */
    @PostMapping
    public Object addUserInfo(@RequestBody UserInfoDTO userInfo) {
        return userInfoService.addUserInfo(userInfo);
    }

    /**
     * 修改用户信息
     *
     * @param userInfo
     * @return
     */
    @PutMapping
    public Object updateUserInfo(@RequestBody UserInfoDTO userInfo) {
        return userInfoService.modifyUserInfo(userInfo);
    }

}
